package com.mall.common.token;

import java.util.List;

import org.apache.shiro.authc.UsernamePasswordToken;

import com.mall.common.entity.PowerInfo;

/**
 * 权限块bean
 * @author tgy
 *
 */
public class UserAuthenticationToken extends UsernamePasswordToken {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;				//用户ID
	private List<PowerInfo> power;  //权限列表
	private String captcha;         // 验证码
	
	/**
	 * @param username 用户名
	 * @param password  密码
	 * @param power 权限列表对象
	 * @param captcha 验证码 (可选)
	 */
	public UserAuthenticationToken(Integer id, String username, String password, List<PowerInfo> power,String captcha) {
		super(username, password);
		this.id = id;
		this.power = power;
		this.captcha = captcha;
	}
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getCaptcha() {
		return captcha;
	}
	public void setCaptcha(String captcha) {
		this.captcha = captcha;
	}

	public List<PowerInfo> getPower() {
		return power;
	}

	public void setPower(List<PowerInfo> power) {
		this.power = power;
	}
	
}
